pp108 : PublishCaseModel (Deprecated)

PublishCaseModel (Deprecated)

This method helps to deploy a new case model or a revision in the existing case model into the run time environment. PublishCaseModel is part of the CaseModelAdministration methodset whose namespace is http://schemas.cordys.com/casemanagement/modeladministration/1.0.

Note: Publishing a document to its runtime is allowed from CWS only. This API required a lot of design time or runtime related details for its execution. There is no way to obtain all such details to execute this service. Also, this API allows users to directly update the content in the runtime repository, which must not be allowed. Updating the contents in the runtime repository must only be considered by deploying or undeploying related application packages.

SOAP Request

<SOAP:Envelope xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">
    <SOAP:Body>
        <PublishCaseModel xmlns="http://schemas.cordys.com/casemanagement/modeladministration/1.0">
            <model id="" name="emp case model" space="organization">
                <runtimedefinition>
                    <case:casemodel
                        targetNamespace="http://schemas.cordys.com/"
                        xmlns:case="http://schemas.cordys.com/casemanagement/1.0"
                        xmlns:ns1="http://schemas.cordys.com/1.0/xforms/processapi"
                        xmlns:ns2="http://schemas.cordys.com/"
                        xmlns:sch="http://schemas.cordys.com/" xmlns:sm="http://www.w3.org/2005/07/scxml">
                        <case:caseproperties>
                            <case:name>emp case model</case:name>
                            <case:description>emp case model</case:description>
                            <case:priority>MEDIUM</case:priority>
                            <case:casedata>sch:emp</case:casedata>
                            <case:caseidentifiers>
                                <case:identifier
                                    description="Current Functional State"
                                    expression="sm:data[@name='case:caseinstanceproperties']/case:caseinstanceproperties/case:currentstate/text()"
                                    name="CurrentState" type="STRING"/>
                                <case:identifier description="name"
                                    expression="sm:data[@name='sch:emp']/sch:emp/sch:name/text()"
                                    name="name" type="STRING"/>
                                <case:identifier
                                    description="designation"
                                    expression="sm:data[@name='sch:emp']/sch:emp/sch:designation/text()"
                                    name="designation" type="STRING"/>
                            </case:caseidentifiers>
                            <case:target
                                roleGuid="005056C0-0008-11E0-EF72-A2FDD76653C8" type="role">cn=Manager,cn=organizational roles,o=system,cn=cordys,cn=CABuild,o=vanenburg.com</case:target>
                            <case:duedate dynamic="false" type="duration">P0Y0M2DT0H0M0S</case:duedate>
                            <case:escalation/>
                        </case:caseproperties>
                        <case:businessevents/>
                        <case:followups/>
                        <sm:scxml initialstate="RootCaseModelState"
                            version="1.0"
                            xmlns:case="http://schemas.cordys.com/casemanagement/1.0" xmlns:sm="http://www.w3.org/2005/07/scxml">
                            <sm:datamodel>
                                <sm:data
                                    name="case:caseinstanceproperties" src="/system/casemangement/CaseModelSchema.xsd"/>
                                <sm:data name="sch:emp" src="005056C0-0008-11E0-EE44-1F2BC90E53C8">
                                    <sch:emp xmlns:sch="http://schemas.cordys.com/">
                                    <sch:id>anyType</sch:id>
                                    <sch:name>anyType</sch:name>
                                    <sch:designation>anyType</sch:designation>
                                    </sch:emp>
                                </sm:data>
                                <sm:data name="case:casevariables">
                                    <case:casevariables>
                                    <case:caseVariable type="team"/>
                                    </case:casevariables>
                                </sm:data>
                                <sm:data name="case:attachments">
                                    <case:attachments/>
                                </sm:data>
                                <sm:data name="ns1:empdata_empdataDefaultDeliveryModel_IP">

                                    <empdata_empdataDefaultDeliveryModel_IP xmlns="http://schemas.cordys.com/1.0/xforms/processapi">
                                    <proc:forminputdata xmlns:proc="http://schemas.cordys.com/1.0/xforms/processapi">
                                    <proc:freeformcontrols>
                                    <proc:input1 display_name="id"/>
                                    <proc:input2 display_name="name"/>
                                    <proc:input3 display_name="des"/>
                                    </proc:freeformcontrols>
                                    </proc:forminputdata>
                                    </empdata_empdataDefaultDeliveryModel_IP>
                                </sm:data>
                                <sm:data name="ns1:empdata_empdataDefaultDeliveryModel_OP">

                                    <empdata_empdataDefaultDeliveryModel_OP xmlns="http://schemas.cordys.com/1.0/xforms/processapi">
                                    <proc:formoutputdata xmlns:proc="http://schemas.cordys.com/1.0/xforms/processapi">
                                    <proc:freeformcontrols>
                                    <proc:input1 display_name="id"/>
                                    <proc:input2 display_name="name"/>
                                    <proc:input3 display_name="des"/>
                                    </proc:freeformcontrols>
                                    </proc:formoutputdata>
                                    </empdata_empdataDefaultDeliveryModel_OP>
                                </sm:data>
                            </sm:datamodel>
                            <sm:state id="RootCaseModelState" initialstate="005056C0-0008-11E0-EEF5-3FCCB0E833C8">
                                <sm:onentry/>
                                <sm:state
                                    id="005056C0-0008-11E0-EEF5-3FCCB0E4F3C8" name="State">
                                    <sm:onentry>
                                    <case:releaseactivity
                                    activity="005056C0-0008-11E0-EEF4-E8953B6513C8"
                                    activitycluster="StateCluster_State"
                                    name="emp data"
                                    srctype="LOCAL"
                                    xmlns:case="http://schemas.cordys.com/casemanagement/1.0"
                                    xmlns:ns1="http://schemas.cordys.com/1.0/xforms/processapi"
                                    xmlns:ns2="http://schemas.cordys.com/"
                                    xmlns:sch="http://schemas.cordys.com/" xmlns:sm="http://www.w3.org/2005/07/scxml"/>
                                    </sm:onentry>
                                    <sm:transition cond=""
                                    event="005056C0-0008-11E0-EEF5-3FCCB0E4F3C8.done" target="final_state"/>
                                </sm:state>
                                <sm:state
                                    id="005056C0-0008-11E0-EEF5-3FCCB0E833C8" name="State">
                                    <sm:onentry>
                                    <case:releaseactivity
                                    activity="005056C0-0008-11E0-EEF4-E8953B6713C8"
                                    activitycluster="StateCluster_State"
                                    name="emp data"
                                    srctype="LOCAL"
                                    xmlns:case="http://schemas.cordys.com/casemanagement/1.0"
                                    xmlns:ns1="http://schemas.cordys.com/1.0/xforms/processapi"
                                    xmlns:ns2="http://schemas.cordys.com/"
                                    xmlns:sch="http://schemas.cordys.com/" xmlns:sm="http://www.w3.org/2005/07/scxml"/>
                                    </sm:onentry>
                                    <sm:transition cond=""
                                    event="005056C0-0008-11E0-EEF5-3FCCB0E833C8.done" target="005056C0-0008-11E0-EEF5-3FCCB0E4F3C8"/>
                                </sm:state>
                                <sm:transition event="Case.close" target="final_state"/>
                            </sm:state>
                            <sm:final id="final_state"/>
                        </sm:scxml>
                        <case:schemas>
                            <xsd:schema elementFormDefault="qualified"
                                targetNamespace="http://schemas.cordys.com/"
                                xmlns=""
                                xmlns:tns="http://schemas.cordys.com/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
                                <xsd:element name="emp" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
                                    <xsd:complexType>
                                    <xsd:sequence>
                                    <xsd:element name="id"/>
                                    <xsd:element name="name"/>
                                    <xsd:element name="designation"/>
                                    </xsd:sequence>
                                    </xsd:complexType>
                                </xsd:element>
                            </xsd:schema>
                        </case:schemas>
                        <case:activitycluster
                            id="005056C0-0008-11E0-EE44-1F2BC90C33C8"
                            locator="__MainCluster__" name="__MainCluster__">
                            <case:activitycluster
                                id="005056C0-0008-11E0-EEF5-3FCCB0E3B3C8"
                                locator="StateCluster_State" name="StateCluster_State">
                                <case:activity
                                    id="005056C0-0008-11E0-EEF4-E8953B6513C8"
                                    name="emp data" type="HUMANTASK">
                                    <HumanInteraction xmlns="http://schemas.cordys.com/notification/workflow/1.0">
                                    <HumanTaskModelId>005056C0-0008-11E0-EE44-EAABB31613C8</HumanTaskModelId>
                                    <Subject>emp data</Subject>
                                    <SendTo>
                                    <Target type="team">
                                    <Assignee dynamic="true">sm:data[@name='case:casevariables']/case:casevariables/case:caseVariable</Assignee>
                                    </Target>
                                    </SendTo>
                                    <DueDate dynamic="false">P0Y0M2DT0H0M0S</DueDate>
                                    </HumanInteraction>
                                    <case:messages>
                                    <case:input>
                                    <case:message
                                    name="empdata_empdataDefaultDeliveryModel_IP" ns="http://schemas.cordys.com/1.0/xforms/processapi"/>
                                    </case:input>
                                    <case:output>
                                    <case:message
                                    name="empdata_empdataDefaultDeliveryModel_OP" ns="http://schemas.cordys.com/1.0/xforms/processapi"/>
                                    </case:output>
                                    </case:messages>
                                    <case:associatedevents/>
                                    <case:duedate dynamic="false" type="duration">P0Y0M2DT0H0M0S</case:duedate>
                                    <case:escalation/>
                                </case:activity>
                            </case:activitycluster>
                            <case:activitycluster
                                id="005056C0-0008-11E0-EEF5-3FCCB0E6F3C8"
                                locator="StateCluster_State" name="StateCluster_State">
                                <case:activity
                                    id="005056C0-0008-11E0-EEF4-E8953B6713C8"
                                    name="emp data" type="HUMANTASK">
                                    <HumanInteraction xmlns="http://schemas.cordys.com/notification/workflow/1.0">
                                    <HumanTaskModelId>005056C0-0008-11E0-EE44-EAABB31613C8</HumanTaskModelId>
                                    <Subject>emp data</Subject>
                                    <SendTo>
                                    <Target type="role">
                                    <Assignee roleGuid="005056C0-0008-11E0-EF72-A2FDD76653C8">cn=Manager,cn=organizational roles,o=system,cn=cordys,cn=CABuild,o=vanenburg.com</Assignee>
                                    </Target>
                                    </SendTo>
                                    <DueDate dynamic="false">P0Y0M2DT0H0M0S</DueDate>
                                    </HumanInteraction>
                                    <case:messages>
                                    <case:input>
                                    <case:message
                                    name="empdata_empdataDefaultDeliveryModel_IP" ns="http://schemas.cordys.com/1.0/xforms/processapi"/>
                                    </case:input>
                                    <case:output>
                                    <case:message
                                    name="empdata_empdataDefaultDeliveryModel_OP" ns="http://schemas.cordys.com/1.0/xforms/processapi"/>
                                    </case:output>
                                    </case:messages>
                                    <case:associatedevents/>
                                    <case:duedate dynamic="false" type="duration">P0Y0M2DT0H0M0S</case:duedate>
                                    <case:escalation/>
                                </case:activity>
                            </case:activitycluster>
                        </case:activitycluster>
                        <case:state id="RootCaseModelState" name="Default State">
                            <case:state
                                id="005056C0-0008-11E0-EEF5-3FCCB0E4F3C8" name="State">
                                <case:duedate dynamic="false" type="duration"/>
                                <case:escalation/>
                            </case:state>
                            <case:state
                                id="005056C0-0008-11E0-EEF5-3FCCB0E833C8" name="State">
                                <case:duedate dynamic="false" type="duration"/>
                                <case:escalation/>
                            </case:state>
                        </case:state>
                    </case:casemodel>
                </runtimedefinition>
            </model>
        </PublishCaseModel>
    </SOAP:Body>
</SOAP:Envelope>

Request Parameters

Parameter

Description

Data Type

Accepted Input Values

model @ id

Refers to the unique identifier for the model. In this case, it is the document id.

GUID

model @ name

Refers to the fully qualified name of the case model.

String

runtimedefinition

Refers to the SCXML of the case model.

String

You can get it from the generated output of the case model.

description

Indicates the place from which the process instances are executed and the place in which they are displayed in the Process Instance Monitor.

String

You can specify any one of the following values:

  • ISV - Displays instances executed from ISV space.
  • Organization - Displays instances executed from the organizational space.

SOAP Response

<SOAP:Envelope xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">
    <SOAP:Body>
        <PublishCaseModelResponse
            xmlns="http://schemas.cordys.com/casemanagement/modeladministration/1.0"
                xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">
      <model
                id="005056C0-0008-11E0-EE44-FFA1DF1153C8"
                latestrevision="005056C0-0008-11E0-EF8F-70C18F3993C8"
                name="emp case model" status="ACTIVE"/>
        </PublishCaseModelResponse>
    </SOAP:Body>
</SOAP:Envelope>

Response Parameters

Parameter

Description

model @ id

Refers to the document id.

model @ name

Refers to the fully qualified name of the case model.